﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MenuItem_9Feb
{
    class MenuItem
    {
        private string name;

        public MenuItem(string input)
        {
            name = input;
        }

        public virtual void PrintToConsole()
        {
            Console.Write("{0} - ", name);
        }
    }

    class Beverage : MenuItem
    {
        private double smallPrice;
        private double mediumPrice;
        private double largePrice;

        public Beverage(double smallPrice, double mediumPrice, double largePrice, string input) : base(input)
        {
            this.smallPrice = smallPrice;
            this.mediumPrice = mediumPrice;
            this.largePrice = largePrice;
        }

        public override void PrintToConsole()
        {
            base.PrintToConsole();
            Console.Write("Small - ${0}, Medium - ${1}, Large - ${2}", smallPrice, mediumPrice, largePrice);
            Console.WriteLine();
        }
    }

        class Snack : MenuItem
        {
            private double price;

            public Snack(double price, string input) : base(input)
            {
                this.price = price;
            }

            public override void PrintToConsole()
            {
                base.PrintToConsole();
                Console.Write("Price: ${0}", price);
                Console.WriteLine();
            }
        }
}
